import { getUserInfo } from '../../../../common/api/index'
Page({
	data: {
		userInfo:{},
		userParentInfo:{},
		serviceList:[
			{name:'推广收益',img:'/static/image/tuiguangshouyi.png',path:'/pages/component/vip/popularizeIncome/index'},
			{name:'我的团队',img:'/static/image/wodetuandui.png',path:'/pages/component/vip/team/index'},
			{name:'股东分红',img:'/static/image/gudongfenhong.png',path:'/pages/component/vip/shareBonus/index'},
			{name:'推广海报',img:'/static/image/tuiguanghaibao.png',path:'/pages/component/vip/poster/index'},
			{name:'平级奖励',img:'/static/image/pingjijiangli.png',path:'/pages/component/vip/parallelReward/index'},
		],
	},
	onLoad(options) {

	},
	onShow() {
		this.getUserInfoData()
	},
	getUserInfoData(){
		getUserInfo().then(res => {
			if(res.code == 200){
				this.setData({
					userInfo: res.data.user,
					userParentInfo: res.data.userPar,
				})
			}
		})
	},
	// 跳转设置
	clickItem(e){
		let path = e.currentTarget.dataset.path
		wx.$goTo(path,true)
	},

  /**
   * 生命周期函数--监听页面加载
   */

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})